// 没有使用插件时，用jq方法动态生成图片,如下
// var arr = ['m1', 'm2', 'm3', 'm4', 'm5']
// for (var i = 0; i < arr.length; i++) {
//     var imgSrc = 'img/'+ arr[i] + '.jpg'
//     $('.focus').append(`<img src="${imgSrc}" alt="">`)
// }
window.addEventListener('load',function(){
    var swiper = new Swiper('.swiper-container', {
        spaceBetween: 30,
        centeredSlides: true,
        loop: true,
        autoplay: {
          delay: 2500,
          disableOnInteraction: false,
        },
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
        },
        navigation: {
          nextEl: '.swiper-button-next',
          prevEl: '.swiper-button-prev',
        },
      });
      
      var iconArr = ['1','2','3','4','5','6']
      var title = ['WEB网站建设开发','移动端设计开发','公众号开发','独立域名','阿里云服务器支持','售后升级体系']
      var p = ['企业站，推广站','APP/小程序开发','订阅号/服务号开发支持','可绑定自己的独立域名','8G空间支持','解决用户后顾之忧']
      for(var i = 0;i<6;i++){
        var imgSrc = 'images/'+ iconArr[i] + '.png'
        $('.areas ul').append(`<li>
                     <span><img src="${imgSrc}" alt=""></span>
                     <h3>${title[i]}</h3>
                     <p>${p[i]}</p>
                  </li>`)
      }

      $('.success ul').on('click','li',function(){
        $('li.act').removeClass('act')
        $(this).addClass('act')
        // console.log(this);       
      })
})
